<?php
/** @var \Illuminate\Routing\Router $router */

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
    return $request->user();
});
Route::post('appoint-queue-all', ['uses' => 'App\Http\Controllers\SendTempController@AppointQueueAll']);
Route::get('appoint-queue', ['uses' => 'App\Http\Controllers\SendTempController@AppointQueue']);
Route::post('interview-remind', ['uses' => 'App\Http\Controllers\SendTempController@InterviewRemind']);
Route::post('family-edu', ['uses' => 'App\Http\Controllers\SendTempController@FamilyEdu']);
Route::post('appoint-remind', ['uses' => 'App\Http\Controllers\SendTempController@AppointRemind']);
Route::get('sign/sync-scan-record', ['uses' => 'App\Http\Controllers\SignController@syncScanRecord']);

Route::get('hospital-data', ['uses' => 'App\Http\Controllers\HospitalController@IndexData']);
Route::get('hospital-appoint-num', ['uses' => 'App\Http\Controllers\HospitalController@SetupScheduling']);
Route::get('article', ['uses' => 'App\Http\Controllers\ArticleController@Info']);
//Route::get('jssdkConfig', ['uses' => 'App\Http\Controllers\WeChatController@jssdkConfig']);
Route::get('pushCode', ['uses' => 'App\Http\Controllers\LoginController@pushCode']);
Route::post('login', ['uses' => 'App\Http\Controllers\LoginController@login']);
$router->group([
    'middleware' => 'auth:hospital-web'
],
    function () use ($router) {
        $router->get('/childs', ['uses' => 'App\Http\Controllers\AppointController@childs']);
        $router->get('/appoint-list', ['uses' => 'App\Http\Controllers\AppointController@appointList']);
        $router->get('/appoint-view', ['uses' => 'App\Http\Controllers\AppointController@appointView']);
        $router->get('/appoint-done', ['uses' => 'App\Http\Controllers\AppointController@appointDone']);
        $router->get('/jssdkConfig', ['uses' => 'App\Http\Controllers\WeChatController@jssdkConfig']);

    });
